"""
Parameter management
"""

struct Parameter{T}
    name::Symbol
    value::T
    description::String
    
    Parameter(name::Symbol, value::T, desc::String = "") where T = new{T}(name, value, desc)
end

struct ParameterList
    parameters::Dict{Symbol, Parameter}
    
    ParameterList() = new(Dict{Symbol, Parameter}())
    ParameterList(params...) = new(Dict(p.name => p for p in params))
end

Base.getindex(pl::ParameterList, key::Symbol) = pl.parameters[key].value
Base.setindex!(pl::ParameterList, value, key::Symbol) = pl.parameters[key] = Parameter(key, value)
Base.haskey(pl::ParameterList, key::Symbol) = haskey(pl.parameters, key)